/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utilitarios;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author ÍCARO KLINGER
 */
public class LerArquivo {

    public LerArquivo(String url) throws IOException {

        try {

            BufferedReader br = new BufferedReader(new FileReader("C:\\Program Files\\Eloma\\Config\\config.bat"));

            String line;

            List<String> ts = new ArrayList<String>();

            String word = null;

            int numLine = 0;

            while ((line = br.readLine()) != null) {

                for (numLine = 0; (line = br.readLine()) != null; numLine++) {

                    word = (line + " " + (numLine + 1));

                    ts.add(word);

                }

                if (word.length() > 0) {

                    ts.add(word);
                    /* 
                     * Collections.sort(listCentro,new 
                     * Comparator<DTO.DTO_CentroDistribuicao_ctd>(){ public int 
                     * compare(DTO.DTO_CentroDistribuicao_ctd o1, 
                     * DTO.DTO_CentroDistribuicao_ctd o2){ return 
                     * o1.getDistanciaPedido 
                     * ().compareTo(o2.getDistanciaPedido()); } 
                     */

                }

            }

            System.out.println(ts);
            // ts.first()  
            br.close();

        } catch (FileNotFoundException e) {
        }

    }
}
